package com.xhkj.shirodemo.controller;

import com.xhkj.shirodemo.pojo.JsonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * \* User: 汪兴华
 * \* Date: 2019/12/29
 * \* Time: 17:50
 */
@RestController
public class LoginController {

    @RequestMapping("/login")
    @ResponseBody
    public JsonResult loginVerify(String userName, String userPwd, String yzm){
        String name="admin";
        String pwd="admin";
        String yam="yzm";
        if (userName.equals(name) && userPwd.equals(pwd) && yam.equals(yzm)){
            return new JsonResult(200,"登录成功！");
        }
        return new JsonResult(404,"登录失败！");
    }
}
